﻿using QueuesLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;

namespace QueuesServer {
    [ServiceContract]
    interface IWorkStationService : IQueuesService {

        [OperationContract(Name="GetNextTicketBySubject")]
        [FaultContract(typeof(InvalidOperationException))] //fila vazia
        [FaultContract(typeof(UnauthorizedAccessException))] //workStation de trabalho desconhecido
        [FaultContract(typeof(ArgumentException))] //subject desconhecido
        Ticket GetNextTicket(string workStationId, int subjectId);

        [OperationContract(Name = "GetNextTicketInGeneral")]
        [FaultContract(typeof(InvalidOperationException))] //fila vazia
        [FaultContract(typeof(UnauthorizedAccessException))] //workStation de trabalho desconhecido
        Ticket GetNextTicket(string workStationId);
    }
}
